//
//  test-BookmarkData.swift
//  YoruNeko
//
//  Created by  mahoPunch on 2021/6/17.
//

import Foundation
import SwiftUI

class BookmarkData: ObservableObject {
    
    @Published var curBookmarkFolder: YRNKBookmark = YRNKBookmark(reference: Bookmark(date_added: Date(), last_visited: Date(), name: "root"), parent: nil, isDirectory: true)
    
    init(){
        var child: YRNKBookmark = YRNKBookmark(reference: Bookmark(date_added: Date(), last_visited: Date(), name: "baidu1", url: "sssss"), parent: curBookmarkFolder, isDirectory: false)
        var child1: YRNKBookmark = YRNKBookmark(reference: Bookmark(date_added: Date(), last_visited: Date(), name: "baidu2", url: "sssss"), parent: curBookmarkFolder, isDirectory: false)
        var child2: YRNKBookmark = YRNKBookmark(reference: Bookmark(date_added: Date(), last_visited: Date(), name: "baidu3"), parent: curBookmarkFolder, isDirectory: true)
        curBookmarkFolder.addChild(child: child)
        curBookmarkFolder.addChild(child: child1)
        curBookmarkFolder.addChild(child: child2)
        
    }
    
    
}
